package com.wenson.behavior.command;

/**
 * @ClassName: Switcher
 * @Author: luowangcheng
 * @Date: 2024/6/16 12:36
 * @Description:
 */
public class BulbSwitcher {
    private Command command;

    //设置命令
    public void setCommand(Command command) {
        this.command = command;
    }

    public void buttonPush(){
        System.out.println("按下按钮……");
        command.exe();
    }

    public void buttonPop(){
        System.out.println("弹起按钮……");
        command.unexe();
    }
}
